<!DOCTYPE html>
<html >
<head>
    <meta charset="utf-8"/>
    <title>群组管理</title>
    <meta name="keywords" content="manager,personal,manage"/>
    <meta name="description" content="群组,群组,群组管理"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="stylesheet" href="./assets/css/validationEngine.jquery.css" type="text/css">
    <link rel="stylesheet" href="./assets/css/datepicker.css"/>
    <!--<style>-->
    <!--table{-->
    <!--table-layout:fixed;-->
    <!--}-->
    <!--td{-->
    <!--overflow:hidden;-->
    <!--text-overflow:ellipsis;-->
    <!--white-space:nowrap;-->
    <!--}-->
    <!--@media screen and (min-width:768px){-->
    <!--.modal-dialog{-->
    <!--right:auto;left:50%;width:690px;padding-top:30px;padding-bottom: 30px;-->
    <!--}-->
    <!--}-->
    <!--</style>-->
    <script src="./assets/js/jquery.validationEngine-zh_CN.js"></script>
    <script src="./assets/js/jquery.validationEngine.js"></script>
</head>
<body>
<div class="page-content">
    <div class="row">
        <div class="col-xs-12">
            <form id="stationFormId" class="form-horizontal" role="form">
                <div class="topSearchBox">
                    <div class="input-group input-group-sm input-group-sm3">
                        <span class="input-group-addon group-addon group-addon2">群组名称</span>
                        <span class="spanIcons"></span>
                        <input type="text" class="form-control form-control-two" id="search-group-name">
                    </div>

                    <div class="input-group input-group-sm input-group-sm3">
                        <span class="input-group-addon group-addon">创建者</span>
                        <span class="spanIcons"></span>
                        <input type="text" class="form-control form-control-two" id="search-leaderUserName">
                    </div>
                   <!--  <div class="input-group input-group-sm input-group-sm3">
                        <span class="input-group-addon group-addon">群组类型</span>
                        <span class="spanIcons"></span>
                        <select class="form-control form-control-two" id="search-group-style">
                            <option value="">不限</option>
                            <option value="groupForFamily">家人</option>
                            <option value="groupForFriend">密友</option>
                            <option value="groupForTeam">团队</option>
                            <option value="groupForStudyGroup">学习小组</option>
                            <option value="groupForNeighbor">邻居</option>
                            <option value="groupForClassmate">同学</option>
                            <option value="groupForOther">其他</option>
                        </select>
                    </div> -->
                    <div class="input-group input-group-sm input-group-sm3">
                        <span class="input-group-addon group-addon">群创建</span>
                        <span class="spanIcons"></span>
                        <select class="form-control form-control-two" id="select-group-type">
                            <option value="">不限</option>
                            <option value="groupTypeForSystem">系统创建</option>
                            <option value="groupTypeForUser">用户创建</option>
                            <option value="groupTypeForDelete">已解散</option>
                        </select>
                    </div>
                </div>
                <div class="topSearchBox">
                    <div class="input-group input-group-sm input-group-sm3">
                        <span class="input-group-addon group-addon">创建时间</span>
                        <input class="form-control date-picker form-control-three" id="endDate"
                               type="text" data-date-format="yyyy-mm-dd"/>
                        <span class="positi"> 至 </span>
                        <input class="form-control date-picker form-control-four" id="startDate"
                               type="text" data-date-format="yyyy-mm-dd"/>
                    </div>
                    <div class="input-group input-group-sm input-group-sm3">
                        <span class="input-group-addon group-addon">成员数</span>
                        <input class="form-control form-control-three" id="memberCountMax"
                               type="text"/>
                        <span class="positi"> 至 </span>
                        <input class="form-control form-control-four" id="memberCountMin"
                               type="text"/>
                    </div>
                    <div class="input-group input-group-sm input-group-sm3">
                        <span class="input-group-addon group-addon">群帖数</span>
                        <input class="form-control form-control-three" id="groupMessageTotalMax"
                               type="text"/>
                        <span class="positi"> 至 </span>
                        <input class="form-control form-control-four" id="groupMessageTotalMin"
                               type="text"/>
                    </div>

                    <div class="input-group input-group-sm input-group-sm3" style="margin-left: 73px;">
                        <button id="dataSearch" class="btn btn-primary btn-sm" title="查询">
                            <i class="icon-search nav-search-icon"></i>
                        </button>
                        <button id="dataAdd" type="button" class="btn btn-primary btn-sm"
                        data-toggle="modal" data-target="#addModal" title="群组添加">
                            <i class="icon-plus-sign bigger-120"></i>
                        </button>
                        <!--<button id="dataUpdate" type="button" class="btn btn-sm btn-success"-->
                        <!--data-toggle="modal" data-target="#updateModal" disabled-->
                        <!--title="帖子修改">-->
                        <!--<i class="icon-pencil bigger-130"></i>-->
                        <!--</button>-->
                        <button id="dataDelete" type="button" class="btn btn-sm btn-danger"
                        data-toggle="modal" data-target="#deleteModal" disabled
                        title="群组删除">
                            <i class="icon-trash bigger-130"></i>
                        </button>
                        <button id="dataadd" type="button" class="btn btn-sm btn-success"
                                data-toggle="modal" data-target="#addModal" title="导出群组">
                            <!--<i class="icon-plus-sign bigger-120"></i>-->
                            导出
                        </button>
                    </div>
                </div>
            </form>
            <div class="row" style="margin-top: 0px;">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <table id="group_table" class="table"></table>
                    <!-- PAGE CONTENT ENDS -->
                </div>
                <!-- /.col -->
            </div>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /.page-content -->
<!-- 添加的modal start-->
<div class="modal fade bs-example-modal-lg" id="addModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="exampleModalLabel">群组添加</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="addForm" data-type="addAdmin">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">群主选择</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input type="text" class="form-control" id="leaderUser" placeholder="群主昵称">
                                <span class="input-group-btn">
                                    <button class="btn btn-default chooseUser" type="button" data-toggle="modal" data-target="#userModal" style="padding: 3px 12px 2px;">选择群主</button>
                                </span>
                            </div>
                            <input type="text" class="form-control" id="leaderUserId" placeholder="群主ID" style="display: none;">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">群组名称</label>
                        <div class="col-sm-10">
                            <input type="text" id="addGroupName" class="validate[required] form-control" placeholder="请输入群名称">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">群组简介</label>
                        <div class="col-sm-10">
                            <input type="text" class="validate[required] form-control" id="addDesc" placeholder="请输入群简介">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">群组类型</label>
                        <div class="col-sm-10">
                            <select class="form-control" name="type" id="addType">
                                <option value="groupForOther">其他</option>
                                <option value="groupForFamily">家人</option>
                                <option value="groupForFriend">密友</option>
                                <option value="groupForTeam">团队</option>
                                <option value="groupForStudyGroup">学习小组</option>
                                <option value="groupForNeighbor">邻居</option>
                                <option value="groupForClassmate">同学</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">群组定位</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input type="text" class="form-control" id="address" placeholder="定位地址">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" data-toggle="modal" data-target="#mapModal" style="padding: 3px 12px 2px;">定位</button>
                                </span>
                            </div>
                            <!--<input type="text" class="form-control" id="address" placeholder="定位地址">-->
                            <input type="text" class="form-control" id="Lat" placeholder="纬度" style="display: none;">
                            <input type="text" class="form-control" id="Lng" placeholder="经度" style="display: none;">
                            <!--<button class="col-sm-2" data-toggle="modal" data-target="#mapModal">定位</button>-->
                        </div>
                    </div>
                </form>

            </div>
            <div class="modal-footer">
                <!--<button class="btn btn-primary" form="addForm">保存</button>-->
                <button id="addGroup" type="button" class="btn btn-primary" name="submit" data-type="add">保存</button>
                <!--  <button type="reset" class="btn btn-warnning">重置</button> -->
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!-- 添加的modal end-->

<!--地图的modal start-->
<div class="modal fade bs-example-modal-lg" id="mapModal">
    <div class="modal-dialog" role="document" style="margin-top: 92px !important;left: 0px;width: 78%;height: 82%;background: white;">
        <div class="modal-content" style="height: 100%;">
            <div class="modal-header">
                <!--<button type="button" class="btn btn-primary" data-dismiss="modal"-->
                        <!--aria-label="Close" style="float: right; border: none;">-->
                    <!--&lt;!&ndash;<span aria-hidden="true" s>确定</span>&ndash;&gt;-->
                    <!--确定-->
                <!--</button>-->
                <h4 class="modal-title" id="exampleModalLabel">群组添加</h4>
                <div class="input-group" style="float: right; width: 70%;top: -28px;">

                </div>
            </div>
            <!--<div id="allmap"></div>-->
            <div class="modal-body" style="height: 77%;">
                <iframe src="TencentMap.html" style="height: 100%;width: 100%;" id="mapWindow"></iframe>
            </div>
            <div class="modal-footer">
                <button class="btn btn-sm btn-primary" type="button" data-dismiss="modal" aria-label="Close">
                    确定
                </button>
            </div>
        </div>
    </div>
</div>
<!--地图的modal end-->

<!-- 选择用户的modal start-->
<div class="modal fade" id="userModal" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel">
    <div  class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="exampleModalLabel">用户选择</h4>
            </div>
            <div class="modal-body">
                <form id="userForm" class="form-horizontal" role="form">
                        <div class="input-group input-group-sm input-group-sm3">
                            <span class="input-group-addon group-addon group-addon2">昵称</span>
                            <span class="spanIcons"></span>
                            <input type="text" class="form-control form-control-two" id="nickname">
                        </div>
                    <div class="input-group input-group-sm input-group-sm3" style="margin-left: 10px;">
                        <button type="button" id="SearchUser" class="btn btn-primary btn-sm" title="查询">
                            <i class="icon-search nav-search-icon"></i>
                        </button>
                    </div>
                </form>
                <table id="user_table" class="table"></table>
            </div>
            <div class="modal-footer">
                <button type="button" id="addUserConfirm" class="btn btn-primary">确定</button>
            </div>
        </div>
    </div>
</div>
<!-- 选择用户的modal end-->

<!-- 修改的modal start-->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel">
    <div id="modalDialog" class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="exampleModalLabel">修改模板</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="updateForm" data-type="updateAdmin">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">模板ID</label>
                        <div class="col-sm-10">
                            <input type="text" id="updateTemplateId" class="form-control" placeholder="请输入ID" disabled>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">内容</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="updateContent" placeholder="请输入内容">
                        </div>
                    </div>
                </form>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" name="submit" data-type="update">保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!-- 修改的modal end-->

<!-- 删除的modal start-->
<div class="modal fade" id="deleteModal" tabindex="-1">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">删除当前群组</h4>
            </div>
            <!--Form的id为myForm-->
            <form id="deleteForm" data-type="deleteAdmin">
                <div class="modal-body"></div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <!--<button type="submit" class="btn btn-primary">确认</button>-->
                    <button type="button" class="btn btn-primary" id="deleteGroup" name="submit" data-type="delete">确认</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- 删除的modal end-->
<script src="./assets/js/date-time/bootstrap-datepicker.min.js"></script>
<script src="script/groupManage.js"></script>
<script type="text/javascript">
    function address(result){
        var data = result.detail;
        if(data.nearPois && data.nearPois.length != 0){
            $('#address').val(data.addressComponents.country + data.nearPois[0].address);
            $('#longitude').val(data.location.lng);
            $('#latitude').val(data.location.lat);
        }else{
            $('#address').val(data.addressComponents.country + data.addressComponents.province + data.addressComponents.city + data.addressComponents.district + data.addressComponents.street);
            $('#longitude').val(data.location.lng);
            $('#latitude').val(data.location.lat);
        };
    };

    //        ifream 调用方法
//    function address(data){
//        var obj = data.detail.addressComponents;
////            $(".address01").html(data.detail.address);
//            $('#address').val(data.detail.addressComponents.country + data.detail.nearPois[0].address);
//            $('#longitude').val(data.detail.location.lng);
//            $('#latitude').val(data.detail.location.lat);
//    };
</script>
<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=s3H1svg4rhAwL6viQNDMVAyCN1XYTlGO"></script>-->
</body>
</html>
